package com.microservice.salmon.db.entities;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Table(name = "t_shop_users")
@Data
@EqualsAndHashCode(of = "id")
public class ShopUser implements Serializable {

    private static final long serialVersionUID = -1328781508722311723L;
    /**
     * 主键
     */
    @Id
    private Integer id;

    /**
     * 店铺ID
     */
    @Column(name = "shop_id")
    private Integer shopId;

    /**
     * 登录名
     */
    @Column(name = "login_name")
    private String loginName;

    /**
     * 登录密码
     */
    private String password;

    /**
     * 角色ID
     */
    @Column(name = "role_id")
    private Integer roleId;

    /**
     * 真实姓名
     */
    private String name;

    /**
     * 手机
     */
    private String mobile;

    /**
     * 手座机
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 冻结时间
     */
    @Column(name = "freeze_date")
    private Date freezeDate;

    /**
     * 解冻时间
     */
    @Column(name = "unfreeze_date")
    private Date unfreezeDate;

    /**
     * 最后一次登录IP
     */
    @Column(name = "last_ip")
    private String lastIp;

    /**
     * 最后一次登录时间
     */
    @Column(name = "last_time")
    private Date lastTime;

    /**
     * 用户状态	0:冻结 1:启用
     */
    @Column(name = "user_status")
    private Byte userStatus;

    /**
     * 用户头像
     */
    private String photo;

    /**
     * 删除标志 1:有效 -1:删除
     */
    @Column(name = "data_flag")
    private Byte dataFlag;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;
}